package cn.ac.ict.fpevaluation.cluster;

import cn.ac.ict.fpevaluation.bean.AtomTrajectoryBean;
import cn.ac.ict.fpevaluation.bean.FusionBean;
import cn.ac.ict.fpevaluation.constant.Constant;
import cn.ac.ict.fpevaluation.utils.GetDateUtils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.UUID;

/**
 * Created by feng on 2017/2/22.
 * <p>
 * 将聚类结果打印到控制台啊
 */
public class DataOperationToConsoleUtil {

    public static void printClusterInfo(String name, List<List<AtomTrajectoryBean>> res) {
        System.out.println("---------------------------------------");

        System.out.println("经" + name + "聚类算法处理之后,聚类数目为:" + res.size() + ";\t详细结果如下所示: ");
        int i = 1;

        for (List<AtomTrajectoryBean> clusters : res) {
            System.out.println("第" + i + "类:");

            i++;
            for (AtomTrajectoryBean cluster : clusters) {
                System.out.println(cluster.getName());
            }
        }
    }

    /**
     * 将融合结果写入磁盘
     *
     * @param data
     * @return
     */
    public static void printFusionResult(List<FusionBean> data) {
        System.out.println("---------------------------------------");
        for (FusionBean fusionBean : data) {
            System.out.println(GetDateUtils.getDate() + "-" + UUID.randomUUID() + ".txt");
        }
    }
}
